<template>
  <div>
    <el-tabs type="border-card" v-model="active" style="min-height: 80vh">
      <el-tab-pane label="替换申请" name="first">
        <confirm-list @success="getRecord"></confirm-list>
      </el-tab-pane>
      <el-tab-pane label="替换记录" name="second">
        <replace-record ref="record"></replace-record>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
// import ReplaceList from '@/bank/views/limit/replace/ReplaceList'
import ConfirmList from '@/bank/views/limit/replace/ConfirmList'
import ReplaceRecord from '@/bank/views/limit/replace/ReplaceRecord'
export default {
  components: {
    ConfirmList,
    ReplaceRecord,
  },
  data() {
    return {
      active: 'first',
    }
  },

  created() {},
  watch: {
    active() {
      if (this.active === 'second') {
        this.getRecord()
      }
    },
  },
  methods: {
    getRecord() {
      this.$nextTick(() => {
        this.$refs.record.getData()
      })
    },
  },
}
</script>
<style lang="scss" scoped></style>
